package br.com.fafica.sisape.view;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Color;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class TelaMensagemErroConexao extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					TelaMensagemErroConexao frame = new TelaMensagemErroConexao();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public TelaMensagemErroConexao() {
		setResizable(false);
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 552, 195);
		contentPane = new JPanel();
		contentPane.setBackground(Color.WHITE);
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblErroDeConexo = new JLabel("Erro de Conex\u00E3o!");
		lblErroDeConexo.setForeground(new Color(0, 0, 128));
		lblErroDeConexo.setFont(new Font("Times New Roman", Font.PLAIN, 20));
		lblErroDeConexo.setBounds(204, 23, 156, 39);
		contentPane.add(lblErroDeConexo);
		
		JLabel lblVerifiqueSeOs = new JLabel("Verifique se os dados do banco foram preenchidos corretamente!");
		lblVerifiqueSeOs.setForeground(new Color(0, 0, 128));
		lblVerifiqueSeOs.setFont(new Font("Times New Roman", Font.PLAIN, 20));
		lblVerifiqueSeOs.setBounds(10, 60, 526, 39);
		contentPane.add(lblVerifiqueSeOs);
		
		JButton btnOk = new JButton("Ok");
		btnOk.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				dispose();
			}
		});
		btnOk.setForeground(new Color(0, 0, 128));
		btnOk.setFont(new Font("Times New Roman", Font.PLAIN, 16));
		btnOk.setBounds(228, 110, 89, 23);
		contentPane.add(btnOk);
	}
}
